package course.experiment2.num2;

public class Employee{
    private String sname;
    private String sex;
    private int age;
    private int sid;
    private double salary;

    Employee (int sid, String sname, String sex, int age, double salary){
        this.sid = sid;
        this.sname = sname;
        this.sex = sex;
        this.age = age;
        this.salary = salary;
    }

    Employee (int sid, String sname, String sex, int age){
        this.sid = sid;
        this.sname = sname;
        this.sex = sex;
        this.age = age;
        this.salary = 2000;
    }
    //以下代码可以选择Source自动生成
    int getSid() {
        return sid;
    }

    String getSname() {
        return sname;
    }

    String getSex() {
        return sex;
    }

    int getAge() {
        return age;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public String toString() {
        return "[sid:" + sid + ", sname:" + sname + ", sex:" + sex + ", age:" + age + ", salary:" + salary + "]";
    }
}
